<h1>Edit Purchaser</h1>
<p>Please enter the purchaser's information below.</p>
<?php if(!empty($message)) {?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php echo $message;?></div>
<?php }?>
<?php echo form_open(current_url());?>
<table width="60%" align="center" class="table-condensed">  
        
        
           <tr> <td><b>  First Name: </b></td>
            <td><?php echo form_input($first_name);?></td>
        </tr>  
      	<tr> <td><b>  Last Name: </b></td>
            <td><?php echo form_input($last_name);?></td>
        </tr>  
         <tr>
         	 <td width="31%"><b>Branch: </b></td>
          	<td colspan="2">
            	  <?php 
	 	$bl[0] = "";
			foreach($branches as $branch){
				$bl[$branch->id] = $branch->name;
				
			}
			echo form_dropdown('id_branch', $bl, $user->company, 'class="chzn-select" data-placeholder="Choose a Group" style="width:220px;"');  ?>
          <?php echo form_error('id_branch');?>
           </td>
        </tr>
     
       <tr>
          <td width="31%"><b>phone: </b></td>
          <td colspan="2"><?php echo form_input($phone_no);?></td>
       </tr>
          <tr>
          <td width="31%"><b> Email: </b> </td>
          <td colspan="2"><?php echo form_input($email);?></td>
        </tr>
    
       <tr>
          <td width="31%"><b> Address: </b></td>
          <td colspan="2"> <?php echo form_textarea($address, '', 'style="height : 50px;"');?></td>
       </tr>
       
        <tr>
           <td>
	            <?php echo form_hidden('id', $user->id);?> 
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td><td><?php echo form_submit($submit,'class="btn btn-success"');?></td>
  </tr>
</table>
<?php echo form_close();?>
